package cn.tedu.egweibo9.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserRegDTO {
    @NotBlank(message = "昵称不能为空白")
    @Size(max = 10, message = "昵称不能超过10字")
    @ApiModelProperty(value = "昵称",required = true,dataType = "string")
    private String nickname;
    @NotBlank(message = "密码不能为空白")
    @Size(max = 10, message = "密码不能超过10字")
    @Pattern(regexp = "\\w+",message = "密码必须为大小写英文/数字/下划线")
    @ApiModelProperty(value = "密码",required = true,dataType = "string")
    private String password;
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 10, message = "用户名必须为3-10字")
    @ApiModelProperty(value = "用户名",required = true,dataType = "string")
    private String username;
}
